<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>基础配置</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../style/wangeditor.css">
    <link rel="stylesheet" href="../../../style/index.css">
    <style>
        .mark {
            display: inline-block;
            width: 7px;
            height: 16px;
            border-radius: 3px;
            background-color: #0064FF;
            margin-right: 10px;
        }

        .flex {
            display: flex;
        }

        .align-center {
            align-items: center;
        }

        .el-input.is-disabled .el-input__inner {
            background-color: #F5F7FA;
            border-color: #E4E7ED;
            color: #606266;
            cursor: not-allowed;
        }

        .el-descriptions-item__label{
            width: 300px;
        }
        .el-input-group__append{
            padding: 0 5px;
        }
        input::-webkit-outer-spin-button,input::-webkit-inner-spin-button {
            -webkit-appearance: none;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <el-form :model="form" :rules="rules" ref="contract" inline-message="true" style="width: 100%">
            <div class="table_titel">
                <div class="titel">系统基础设置</div>
                <div class="operation">
                    <el-button type="text" size="small">修改记录</el-button>
                    <el-button type="text" size="small">清除缓存</el-button>
                </div>
            </div>
            <el-collapse style="margin-bottom: 10px;" v-model="activeNames">
                <el-collapse-item name="1">
                    <template slot="title">
                        <div class="flex align-center">
                            <i class="mark"></i>
                            <span style="font-size: 14px; font-weight: 600;">域名设置</span>
                        </div>
                    </template>
                    <el-descriptions :column="1" border size="small">
                        <el-descriptions-item label="接口域名">
                            <el-form-item prop="Interface_BASE_URL">
                                <el-input v-model.trim="form.Interface_BASE_URL" placeholder="请输入接口域名"></el-input>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="业务域名">
                            <el-form-item prop="Business_BASE_URL">
                                <el-input v-model.trim="form.Business_BASE_URL" placeholder="请输入业务域名"></el-input>
                            </el-form-item>
                        </el-descriptions-item>
                    </el-descriptions>
                </el-collapse-item>
                <el-collapse-item name="2">
                    <template slot="title">
                        <div class="flex align-center">
                            <i class="mark"></i>
                            <span style="font-size: 14px; font-weight: 600;">定时任务</span>
                        </div>
                    </template>
                    <el-table :data="ScheduledTasks" stripe border max-height="600" style="width: 100%">
                        <el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
                        <el-table-column prop="Scheduled_Name" label="定时任务" width="180"></el-table-column>
                        <el-table-column label="执行方式" min-width="600">
                            <template v-slot="{row}">
                                <el-radio-group v-model="row.type">
                                    <el-radio label="1">每日指定时间执行</el-radio>
                                    <el-radio label="2">指定间隔时间执行</el-radio>
                                    <!-- <el-radio label="2">每日指定日期范围内指定时间执行</el-radio> -->
                                </el-radio-group>
                            </template>
                        </el-table-column>
                        <el-table-column label="执行时间" width="250" align="center">
                            <template v-slot="{row}">
                                <el-time-select  v-if="row.type=='1'"  value-format="H:m:s"  placeholder="请选择执行时间" v-model="row.timer" :picker-options="{ start: '00:00', step: '01:00', end: '23:00' }"></el-time-select>
                                <div v-else-if="row.type=='2'" style="display: flex;">
                                    <el-input type="number" v-model="row.timer" placeholder="请输入间隔时间"></el-input>
                                    <el-select style="width: 100px;" v-model="row.time" placeholder="请选择">
                                        <el-option label="秒" value="s"></el-option>
                                        <el-option label="分" value="m"></el-option>
                                        <el-option label="时" value="h"></el-option>
                                    </el-select>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="Status" label="状态" align="center">
                            <template v-slot="{row}">
                                {{row.istrue?'已开启':'已关闭'}}
                            </template>  
                        </el-table-column>
                        <el-table-column  align="center" label="操作" width="180">
                            <template v-slot="{row}">
                                <el-button :type="row.istrue?'danger':'success'" size="small" @click="Scheduled(row)">{{row.istrue?'关闭':'开启'}}</el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-collapse-item>
                <!-- <el-collapse-item name="2">
                    <template slot="title">
                        <div class="flex align-center">
                            <i class="mark"></i>
                            <span style="font-size: 14px; font-weight: 600;">系统LOGO设置</span>
                        </div>
                    </template>
                    <el-descriptions :column="2" border size="small">
                        <el-descriptions-item label="上传系统logo">
                            <el-form-item prop="image">
                                <yl-upload v-model.trim="form.image"></yl-upload>
                            </el-form-item>
                        </el-descriptions-item>
                    </el-descriptions>
                </el-collapse-item>
                <el-collapse-item name="3">
                    <template slot="title">
                        <div class="flex align-center">
                            <i class="mark"></i>
                            <span style="font-size: 14px; font-weight: 600;">菜单设置</span>
                        </div>
                    </template>
                    <el-descriptions :column="1" border size="small">
                        <el-descriptions-item label="是否同时只能打开一个目录">
                            <el-form-item prop="accordion">
                                <el-radio-group v-model="form.accordion">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="侧边默认折叠状态">
                            <el-form-item prop="collapse">
                                <el-radio-group v-model="form.collapse">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否开启多系统菜单模式">
                            <el-form-item prop="control">
                                <el-radio-group v-model="form.control">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="顶部菜单宽度 px">
                            <el-form-item prop="controlWidth">
                                <el-input-number v-model="form.controlWidth" :min="100"></el-input-number>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否开启异步菜单">
                            <el-form-item prop="async">
                                <el-radio-group v-model="form.async">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                    </el-descriptions>
                </el-collapse-item>
                <el-collapse-item name="4">
                    <template slot="title">
                        <div class="flex align-center">
                            <i class="mark"></i>
                            <span style="font-size: 14px; font-weight: 600;">视图内容设置</span>
                        </div>
                    </template>
                    <el-descriptions :column="1" border size="small">
                        <el-descriptions-item label="是否开启多选项卡">
                            <el-form-item prop="enable">
                                <el-radio-group v-model="form.enable">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="保持视图状态">
                            <el-form-item prop="keepState">
                                <el-radio-group v-model="form.keepState">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="开启选项卡记忆">
                            <el-form-item prop="session">
                                <el-radio-group v-model="form.session">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="刷新时预加载非激活标签页">
                            <el-form-item prop="preload">
                                <el-radio-group v-model="form.preload">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="可打开的数量">
                            <el-form-item prop="max">
                                <el-input-number v-model="form.max" :min="5"></el-input-number>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否开启异步菜单">
                            <el-form-item prop="async">
                                <el-radio-group v-model="form.async">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否开启异步菜单">
                            <el-form-item prop="index">
                                <el-select placeholder="请选择首页" style="width: 100%;" clearable filterable
                                    v-model.trim="form.index">
                                    <el-option v-for="(item,index) in page" :key="index" :label="item.Page_Name"
                                        :value="item.File_Name"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                    </el-descriptions>
                </el-collapse-item>
                <el-collapse-item name="5">
                    <template slot="title">
                        <div class="flex align-center">
                            <i class="mark"></i>
                            <span style="font-size: 14px; font-weight: 600;">主题配置</span>
                        </div>
                    </template>
                    <el-descriptions :column="1" border size="small">
                        <el-descriptions-item label="默认主题配色">
                            <el-form-item prop="defaultColor">
                                <el-select placeholder="请选择默认主题配色" style="width: 100%;" clearable filterable
                                    v-model.trim="form.defaultColor">
                                    <el-option v-for="(item,index) in colors" :key="index" :label="item.color"
                                        :value="item.id">
                                        <i class="el-icon-s-open" :style="{color:item.color}"></i>
                                        {{item.color}}
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="默认的菜单主题">
                            <el-form-item prop="defaultMenu">
                                <el-select placeholder="请选择默认的菜单主题" style="width: 100%;" clearable filterable
                                    v-model.trim="form.defaultMenu">
                                    <el-option v-for="(item,index) in theme" :key="index" :label="item.label"
                                        :value="item.id"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="默认的顶部主题">
                            <el-form-item prop="defaultHeader">
                                <el-select placeholder="请选择默认的菜单主题" style="width: 100%;" clearable filterable
                                    v-model.trim="form.defaultHeader">
                                    <el-option v-for="(item,index) in theme" :key="index" :label="item.label"
                                        :value="item.id"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否允许用户切换主题">
                            <el-form-item prop="allowCustom">
                                <el-radio-group v-model="form.allowCustom">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="通栏配置">
                            <el-form-item prop="banner">
                                <el-radio-group v-model="form.banner">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                    </el-descriptions>
                </el-collapse-item>
                <el-collapse-item name="6">
                    <template slot="title">
                        <div class="flex align-center">
                            <i class="mark"></i>
                            <span style="font-size: 14px; font-weight: 600;">其它配置</span>
                        </div>
                    </template>
                    <el-descriptions :column="1" border size="small">
                        <el-descriptions-item label="主页动画时长(毫秒)">
                            <el-form-item prop="keepLoad">
                                <el-input-number v-model="form.keepLoad" :min="100"></el-input-number>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="布局顶部主题">
                            <el-form-item prop="autoHead">
                                <el-radio-group v-model="form.autoHead">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item label="页脚">
                            <el-form-item prop="footer">
                                <el-radio-group v-model="form.footer">
                                    <el-radio :label="'1'">是</el-radio>
                                    <el-radio :label="'0'">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-descriptions-item>
                    </el-descriptions>
                </el-collapse-item> -->
            </el-collapse>    
            <el-button type="primary" :loading="loading" @click="submitForm('contract')">保存</el-button>
        </el-form>
    </div>
    <script type="text/javascript" src="../../../utils/wangeditor.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.min.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../utils/vuex.min.js"></script>
    <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../component/component.js"></script>
    <script type="text/javascript" src="../../../config/config.js"></script>
    <script type="text/javascript" src="../../../utils/compressor.js"></script>
    <script type="text/javascript" src="../../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="../../../utils/utils.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
</body>

</html>